home *** CD-ROM | disk | FTP | other *** search
/ Motor Sport Digital Archive Collection 1960s / Motor Sport Digital Archive Collection 1960s.iso / main.swf / scripts / mx / core / ComponentDescriptor.as < prev    next >
Encoding:
Text File  |  2008-05-21  |  1.7 KB  |  77 lines

  1. package mx.core
  2. {
  3.    use namespace mx_internal;
  4.    
  5.    public class ComponentDescriptor
  6.    {
  7.       mx_internal static const VERSION:String = "2.0.1.0";
  8.       
  9.       public var events:Object;
  10.       
  11.       public var document:Object;
  12.       
  13.       public var type:Class;
  14.       
  15.       public var propertiesFactory:Function;
  16.       
  17.       private var _properties:Object;
  18.       
  19.       public var id:String;
  20.       
  21.       public function ComponentDescriptor(param1:Object)
  22.       {
  23.          var _loc2_:String = null;
  24.          super();
  25.          for(_loc2_ in param1)
  26.          {
  27.             this[_loc2_] = param1[_loc2_];
  28.          }
  29.       }
  30.       
  31.       public function toString() : String
  32.       {
  33.          return "ComponentDescriptor_" + id;
  34.       }
  35.       
  36.       public function invalidateProperties() : void
  37.       {
  38.          _properties = null;
  39.       }
  40.       
  41.       public function get properties() : Object
  42.       {
  43.          var _loc1_:Array = null;
  44.          var _loc2_:int = 0;
  45.          var _loc3_:int = 0;
  46.          if(_properties)
  47.          {
  48.             return _properties;
  49.          }
  50.          if(propertiesFactory != null)
  51.          {
  52.             _properties = propertiesFactory.call(document);
  53.          }
  54.          if(_properties)
  55.          {
  56.             _loc1_ = _properties.childDescriptors;
  57.             if(_loc1_)
  58.             {
  59.                _loc2_ = int(_loc1_.length);
  60.                _loc3_ = 0;
  61.                while(_loc3_ < _loc2_)
  62.                {
  63.                   _loc1_[_loc3_].document = document;
  64.                   _loc3_++;
  65.                }
  66.             }
  67.          }
  68.          else
  69.          {
  70.             _properties = {};
  71.          }
  72.          return _properties;
  73.       }
  74.    }
  75. }
  76.  
  77.